<h3>首页循环图像列表</h3>

<table>
  <tr>   
    <th>图片</th>
    <th>链接</th>
    <th>排序</th>
  </tr>

<% for cycle in @cycles %>
  <tr>    
    <td> <%=image_tag cycle.img ? "newsimgs/"+cycle.img : "no_image",:size=>"40x40" %></td>
    <td><%=h cycle.link %></td>
    <td><%=h cycle.sort  %></td>
    <td><%= link_to 'Edit', edit_cycle_path(cycle) %></td>
    <td><%= link_to 'Destroy', cycle, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New cycle', new_cycle_path %>
<fieldset class="demo">
  <LEGEND>操作说明：</LEGEND>
  <p>
    编辑首页循环图像,*为必填项。
  </p>
</fieldset>